package com.lingo.mgr.domain.vo;

import com.lingo.mgr.enums.ChatgptError;
import lombok.Data;

/**
 * sse响应
 **/
@Data
public class SseVo {

    private String id;

    private String body;

    /**
     * 错误码
     */
    private String errorCode;

    public SseVo(String id, ChatgptError chatgptError) {
        this.id = id;
        body = chatgptError.getErrorMsg();
        errorCode = chatgptError.getErrorCode();
    }

    public SseVo(String id, String body, String errorCode) {
        this.id = id;
        this.body = body;
        this.errorCode = errorCode;
    }

    public SseVo(String id, String body) {
        this.id = id;
        this.body = body;
    }
}
